

import task from "../../../models/dict/task.js"  //任务字典模块
import clType from "../../../models/dict/clothesSizeType"  //任务字典模块
import array from "../../../models/comm/array.js"  //数组操作模块
import py from '../../../models/comm/webPy';
import axios from 'axios';
import Vue from 'vue'

import taskInfoShow from '../task/taskInfoShow.vue';
export default {


    data: function () {


        return {
            taskList: [],
            test: ""







        }
    },
    props:
    {

        customerOrder: {},
        dataType: {},
        nodeId: {}

    },
    methods: {
        getTaskList() {

            axios.post("/a", {
                class: "task",
                para: "getTaskList",
                j: {
                    data: {

                        customerOrderId: this.customerOrder._id,
                        flowClassId: this.dataType,
                        nodeId: this.nodeId

                    } 
                }

            }).then((res) => {

                this.taskList = res.data.list
                this.test = JSON.stringify(this.taskList)

            });
        }




    },
    mounted() {
        console.log("创建了!~");

    },
    watch: {

        nodeId: function () {
            console.log("nodeId改变,获取任务");
            this.getTaskList();
        }

    },
    components: {
        taskInfoShow
    }



}